-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fast_brake command for HWP rapid spindown #787
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
elif isinstance(state, ControlState.WaitForFastBrake): | ||
f0 = query_pid_state()['current_freq'] | ||
time.sleep(5) | ||
f1 = query_pid_state()['current_freq'] | ||
if f0 < 0.2 or (f1 > f0): | ||
self.log.info("Turning off PMX and putting PCU in stop mode") | ||
self.run_and_validate(clients.pmx.set_off) | ||
self.run_and_validate( | ||
clients.pcu.send_command, | ||
kwargs={'command': 'stop'}, timeout=None | ||
) | ||
time.sleep(5) | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block of code seems largely similar to the block of code handling ControlState.WaitForBrake
in lines 1149-1165, with the only difference being that this block doesn't wait for the rotor to completely spin down. It might be simpler to add a boolean attribute to ControlState.WaitForBrake
named fast
which determines whether or not to run lines 1160-1164.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also whenever the ControlState.WaitForFastBrake
finishes, it should set the state to ControlState.Done
In terms of content this all seems perfectly reasonable to me (although we should definitely test the fast brake process with an actual device before merging). However, structurally it might be best to merge the fast brake control states into the normal brake states, as they seem to share many of the same lines of code. |
Description
Update
brake
command ofhwp_supervisor
.Motivation and Context
WG team is trying to measure the time constant by changing the hwp frequency rapidly e.g. +2Hz to -2Hz.
Current
brake
command is designed for gentle spindown and it takes >10 min to start inverse rotation.New option of brake command is expected to take <2 min to spindown.
https://docs.google.com/presentation/d/1-kgAFn2sVR3R_Hp8_HcEYgZ8_SoNihm-UwsMn-Skxto/edit?usp=sharing
How Has This Been Tested?
Not tested yet
Types of changes
Checklist: